package file;

import java.io.File;
import java.io.IOException;
import java.io.RandomAccessFile;

public class RandomAccessRead_demo {

	public static void main(String[] args) throws IOException {
		File file = new File("E:/desktop/javaTest.txt");
		System.out.println(file.exists());
		RandomAccessFile raf = new RandomAccessFile(file, "rw");
		
//		byte[] data = "HelloWorld".getBytes();
//		
//		for(int i =0;i<10;i++){
//			raf.write(data);
//		}
		
		System.out.println((char)raf.readByte());
		
		raf.skipBytes(3);
		System.out.println((char)raf.readByte());
		
		
	
		raf.close();
	}

}
